import service from '@/request/index';

// 订单列表
export const orders = (params) => {
    return service({
        url: `/orders?number=${params}`,
        method: 'get'
    })
}

// 订单详情
export const show = (params) => {
    return service({
        url: `/orders/show/${params}`,
        method: 'get',
    })
}

// 订单权限
export const show_status = (params) => {
    return service({
        url: `/orders/show_status/${params}`,
        method: 'get',
    })
}

// 取消订单
export const cancel = (data) => {
    return service({
        url: `/orders/cancel/${data}`,
        method: 'post',
    })
}

// paypal 支付
export const paypal = (params, data) => {
    return service({
        url: `/orders/paypal/${params}`,
        method: 'post',
        data: JSON.stringify(data)
    })
}
